﻿@model SystemInfoModel

@{
    //page title
    ViewBag.Title = T("Admin.System.SystemInfo").Text;
    //active menu item (system name)
    Html.SetActiveMenuItemSystemName("System information");
}

<div class="content-header clearfix">
    <h1 class="pull-left">
        @T("Admin.System.SystemInfo")
    </h1>
    <div class="pull-right">
        &nbsp;
    </div>
</div>

<script type="text/javascript">
    function toggleLoadedAssemblies() {
        $('#pnlLoadedAssemblies').toggle();
        if ($('#pnlLoadedAssemblies').css('display') == 'none') {
            $('#loadedAssembliesShowHide').html('@T("Admin.Common.Show")');
        }
        else {
            $('#loadedAssembliesShowHide').html('@T("Admin.Common.Hide")');
        }
    }

    function toggleLoadedServerVariables() {
        $('#pnlServerVariables').toggle();
        if ($('#pnlServerVariables').css('display') == 'none') {
            $('#serverVariablesShowHide').html('@T("Admin.Common.Show")');
        }
        else {
            $('#serverVariablesShowHide').html('@T("Admin.Common.Hide")');
        }
    }
</script>

<div class="content">
    <div class="form-horizontal">
        <div class="panel-group">
            <div class="panel panel-default">
                <div class="panel-body">
                    <div class="form-group">
                        <div class="col-md-3">
                            @Html.SDFLabelFor(model => model.SDFVersion)
                        </div>
                        <div class="col-md-9">
                            @Html.SDFDisplayFor(model => model.SDFVersion)
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-3">
                            @Html.SDFLabelFor(model => model.OperatingSystem)
                        </div>
                        <div class="col-md-9">
                            @Html.SDFDisplayFor(model => model.OperatingSystem)
                        </div>
                    </div>  
                    <div class="form-group">
                        <div class="col-md-3">
                            @Html.SDFLabelFor(model => model.AspNetInfo)
                        </div>
                        <div class="col-md-9">
                            @Html.SDFDisplayFor(model => model.AspNetInfo)
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-3">
                            @Html.SDFLabelFor(model => model.IsFullTrust)
                        </div>
                        <div class="col-md-9">
                            @Html.SDFDisplayFor(model => model.IsFullTrust)
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-3">
                            @Html.SDFLabelFor(model => model.ServerTimeZone)
                        </div>
                        <div class="col-md-9">
                            @Html.SDFDisplayFor(model => model.ServerTimeZone)
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-3">
                            @Html.SDFLabelFor(model => model.ServerLocalTime)
                        </div>
                        <div class="col-md-9">
                            @Html.SDFDisplay(Model.ServerLocalTime.ToString("F"))
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-3">
                            @Html.SDFLabelFor(model => model.UtcTime)
                        </div>
                        <div class="col-md-9">
                            @Html.SDFDisplay(Model.UtcTime.ToString("F"))
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-3">
                            @Html.SDFLabelFor(model => model.CurrentUserTime)
                        </div>
                        <div class="col-md-9">
                            @Html.SDFDisplay(Model.CurrentUserTime.ToString("F"))
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-3">
                            @Html.SDFLabelFor(model => model.HttpHost)
                        </div>
                        <div class="col-md-9">
                            @Html.SDFDisplayFor(model => model.HttpHost)
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-3">
                            @Html.SDFLabelFor(model => model.ServerVariables)
                        </div>
                        <div class="col-md-9">
                            <a id="serverVariablesShowHide" href="javascript:toggleLoadedServerVariables();">@T("Admin.Common.Show")</a>
                            <div id="pnlServerVariables" style="display: none; word-break: break-all">
                                <ul class="common-list">
                                    @foreach (var serverVariable in Model.ServerVariables)
                                    {
                                        <li>
                                            @serverVariable.Name<text>:</text>
                                            @serverVariable.Value
                                        </li>
                                    }
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-3">
                            @Html.SDFLabelFor(model => model.LoadedAssemblies)
                        </div>
                        <div class="col-md-9">
                            <a id="loadedAssembliesShowHide" href="javascript:toggleLoadedAssemblies();">@T("Admin.Common.Show")</a>
                            <div id="pnlLoadedAssemblies" style="display: none">
                                <ul class="common-list">
                                    @foreach (var assembly in Model.LoadedAssemblies)
                                    {
                                        <li>
                                            <div>@assembly.FullName</div>
                                            @if (!String.IsNullOrEmpty(assembly.Location))
                                            {
                                                <div>
                                                    <em>@assembly.Location</em>
                                                </div>
                                            }
                                        </li>
                                    }
                                </ul>
                            </div>
                        </div>
                    </div>  
                </div>           
            </div>
        </div>
    </div>
</div>
